<template>
  <div id='TabBar'>
    <tab-bar-item path="/home" textcolor="blue">
      <img src="~assets/img/tabbar/home.svg" alt="" slot="active">
      <img src="~assets/img/tabbar/home_active.svg" alt="" slot="inactive">
      <div slot="text">首页</div>
    </tab-bar-item>
    <tab-bar-item path="/category" textcolor="blue">
      <img src="~assets/img/tabbar/category.svg" alt="" slot="active">
      <img src="~assets/img/tabbar/category_active.svg" alt="" slot="inactive">
      <div slot="text">分类</div>
    </tab-bar-item>
    <tab-bar-item path="/shopcart" textcolor="blue">
      <img src="~assets/img/tabbar/shopcart.svg" alt="" slot="active">
      <img src="~assets/img/tabbar/shopcart_active.svg" alt="" slot="inactive">
      <div slot="text">购物车</div>
    </tab-bar-item>
    <tab-bar-item path="/profile">
      <img src="~assets/img/tabbar/profile.svg" alt="" slot="active">
      <img src="~assets/img/tabbar/profile_active.svg" alt="" slot="inactive">
      <div slot="text">我的</div>
    </tab-bar-item>
  </div>
</template>

<script>
  import TabBarItem from "./TabBarItem.vue"

  export default {
    name: 'TabBar',
    data() {
      return {}
    },
    components: {
      TabBarItem
    },
    methods: {},
  }
</script>

<style scoped>
  #TabBar {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 49px;
    background-color: #f5f5f5;
    box-shadow: 0 1px 2px 1px rgba(0, 0, 0, 0.3);
  }
</style>